package com.pet.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pet.system.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface TokenMapper extends BaseMapper<User> {

    @Select("SELECT  `id`,  `username`, `password`, `nickname`, `phone`, " +
            " `create_time`, `sex`, `role`  FROM `user` " +
            "WHERE  `username`= #{username,jdbcType=VARCHAR} AND `password`= #{password,jdbcType=VARCHAR}")
    User login(@Param("username")String username, @Param("password")String password);
}
